package com.example.demo;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement
@EnableJpaRepositories(basePackages = {"com.example.demo.repository"})
@EntityScan(basePackages = {"com.example.demo.entity"})
@SpringBootApplication
public class JpaShardingDemoApplication {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(JpaShardingDemoApplication.class);
        application.setBannerMode(Banner.Mode.OFF);
        application.addListeners(new ApplicationPidFileWriter());
        application.run(args);
    }

}
